package com.fjl.boot;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

// 14. ApplicationListener 监听事件
@Component
class MyApplicationListener implements ApplicationListener<ApplicationEvent> {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        System.out.println(">> ApplicationListener received event: " + event.getClass().getSimpleName());
    }
}